import type { RouteRecordRaw } from 'vue-router';
import { $t } from '@/locales';

function Layout() {
  return import('@/layouts/index.vue');
}

const routes: RouteRecordRaw = {
  path: '/image_management',
  component: Layout,
  redirect: '/image_management/index',
  name: 'imageManagement',
  meta: {
    title: '办公室图片管理',
    icon: 'icon_image',
  },
  children: [
    {
      path: 'index',
      name: 'imageManagementIndex',
      component: () => import('@/views/dcp/image_management/image.vue'),
      meta: {
        title: '图片/视频',
        singleMenu: true,
        i18n: $t('route.dcp.managementPlatform.imageManagement'),
        auth: 'image_management_index',
        activeIcon: 'system-point',
      },
    },
    {
      path: 'upload',
      name: 'imageManagementUpload',
      component: () => import('@/views/dcp/image_management/index.vue'),
      meta: {
        title: '图片/视频上传',
        singleMenu: true,
        i18n: $t('route.dcp.managementPlatform.uploadManagement'),
        auth: 'image_management_upload',
        activeIcon: 'system-point',
      },
    },
    {
      path: 'management',
      name: 'imageManagementManagement',
      component: () => import('@/views/dcp/image_management/image_management.vue'),
      meta: {
        title: '图片/视频管理',
        singleMenu: true,
        i18n: $t('route.dcp.managementPlatform.imageManagementManagement'),
        auth: 'image_management_management',
        activeIcon: 'system-point',
      },
    },

  ],
};

export default routes;
